package com.xuxk.project.library.feign;

import com.xuxk.project.library.util.PageInfoVo;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;

/**
 * @author 许孝康
 * @date 2020/8/3
 * @company 橙云科技有限公司
 */
@RefreshScope
@FeignClient(name = "${feign.server.oauth.name}")
public interface OauthUserFeignClient {

    /**
     * 分页查询
     * @param pageNum  页码
     * @param pageSize 页行数
     * @param request
     * @return
     */
    @GetMapping(value = "/rpc/xuxkUser/v1.0/xuxkUsers", produces = MediaType.APPLICATION_JSON_VALUE)
    @ResponseBody
    PageInfoVo xuxkUsers(@RequestParam(name = "pageNum") Integer pageNum,@RequestParam(name = "pageSize") Integer pageSize, HttpServletRequest request);

}
